<script setup>
import { defineProps } from 'vue'
const props = defineProps({
  title: {
    required: true,
    type: String
  }
})
</script>
<template>
  <el-card class="page-container">
    <template #header>
      <div class="header">
        <span>{{ props.title }}</span>
        <div class="extra">
          <slot name="extra"></slot>
        </div>
      </div>
    </template>
    <!--  内容主体-->
    <slot name="main"></slot>
    <slot name="footer"></slot>
  </el-card>
</template>

<style lang="less" scoped>
.page-container {
  height: 100vh;
  box-sizing: border-box;

  .el-card__header {
    height: 20vh;
  }
  .header {
    max-height: 5vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}
</style>
